-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compatibility with ghc-prim-0.9.0.0 on 64 bit #304
Conversation
@bgamari, @parsonsmatt, are you able to take a look at this? I am unable to build cborg on my Raspberry Pi 4:
|
Are you building with this branch? If so, it seems that the If not, what version of GHC are you using? |
@parsonsmatt, Here are some of the relevant details:
In this configuration, everything builds properly. |
What configuration failed to build? I'm guessing GHC 9.4.4 without this patch? |
Correct: When using GHC 9.4.4, this patch is required for my application to build. |
This fixed the build for me with GHC 9.4.4 on an ARM64 machine running Linux. Thanks! |
Yeah, would be great if we could merge this. We are running off of a fork for quite some time now. |
Hey @alexbiehl - I think this is a bit off. If you look at parameters needed for #if WORD_SIZE_IN_BITS == 64
+#if MIN_VERSION_base(4,17,0)
+-- case taken from Codec.CBOR.Decoding
+ w64 w# = W64# (wordToWord64# (toWord w#))
+#else
w64 w# = W64# (toWord w#)
+#endif
#else
w64 w# = W64# (wordToWord64# (toWord w#))
#endif
-
#endif I based my thinking on similar code done in https://github.com/well-typed/cborg/blob/master/cborg/src/Codec/CBOR/Decoding.hs#L331 PR: #307 |
Fixed in #307. |
Thank you @bgamari! |
Without this patch the build fails with ghc-9.4.1 on my machine. Places for word16 and word32 look very similar already.